#include "stdafx.h"
#include "MissileBase.h"


CMissileBase::CMissileBase()
{

}

CMissileBase::CMissileBase(float x_, float y_, float w_, float h_, int tex_):CSprite( x_,  y_,  w_,  h_, tex_)
{
}


CMissileBase::~CMissileBase()
{
}

void
CMissileBase::update(float dt_)
{
	if (CInput::getInstance()->getIfKeyDown(DIK_RIGHT))
	{
		m_fX += 0.03;
	}

	if (CInput::getInstance()->getIfKeyDown(DIK_LEFT))
	{
		m_fX -= 0.03;
	}
	/*
	if (CInput::getInstance()->getIfKeyDown(DIK_UP))
	{
		m_fY += 0.01;
	}

	if (CInput::getInstance()->getIfKeyDown(DIK_DOWN))
	{
		m_fY -= 0.01;
	}*/


	if (m_fX >= 3.2)
	{
		m_fX = 3.2;
	}
	if (m_fX <= -3.2)
	{
		m_fX = -3.2;
	}
}
